feat: unified download progress with cross-layer progress events - #113
Merged
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Replace inline download logic with the centralized download module. The JDBC bridge now uses the generic download module for Maven artifact downloads, JRE version resolution, and bridge binary downloads. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Register the download module in lib.rs and extend the JDBC command handlers to use the new download module for artifact downloads and progress reporting. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Emit download progress events from the JDBC bridge process during JRE resolution and driver artifact downloads. Includes protocol buffer for progress messages and updated driver resolver. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add useDownloadEvents composable that listens to Tauri download-progress events and exposes reactive state for download progress, completion, and errors across components. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Integrate download progress UI into the server connection dialog and the JRE/Driver settings section. Shows real-time progress bars for JRE and driver downloads with error handling. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add check_driver_update Tauri command that checks Maven Central for latest driver version, supporting both Maven and download_url drivers. Includes DriverUpdateStatus struct, parse_maven_latest_version helper, and adds missing driver type mappings (TDengine, YashanDB, KingbaseES, OceanbaseOracle) to parse_db_type and db_type_to_registry_key. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add DriverUpdateStatus type with current_version, latest_version, update_available fields, and checkDriverUpdate method on the jdbcApi object. Re-export DriverUpdateStatus from datasources/index.ts. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Fix download_jdbc_driver_direct to resolve latest version from Maven metadata XML instead of using literal 'latest' (which returns 404 for 20+ drivers). Add download_url path for non-Maven drivers (e.g. GBase 8a) that bypasses Maven resolution entirely. Version resolution priority: download_url > version_cap > maven-metadata.xml. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add notifications block (upToDate, updateAvailable, newVersion, downloadSuccess, etc.) and actions.checkUpdates label to jreCard, bridgeCard, and driversCard sections for both enUS and zhCN locales. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add spinning update icon and handleCheckJreUpdates/handleCheckDriverUpdates functions with toast notifications and auto-download. Gate driver download on bridge JAR being installed. Show success toasts on download/remove for JRE, bridge, and drivers. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add downloadProgress computed from DownloadEvent in useAppUpdater composable. Replace spinner icon with circular progress ring during download in SettingsPage.vue. Auto-start download when check finds an update available. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across commands/ and connection/ modules. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across connection handle/impl and database adapters (clickhouse, mysql, postgres, rqlite, sqlite, turso, http_sql, strategy, config). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Formatting-only changes from cargo fmt across jdbc_bridge submodules (adapter, fallback, jre, launcher, mod, tns_parser). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a unified download abstraction layer across Rust/Java/TypeScript with real-time progress eventing. JDK/JRE and driver downloads now show circular progress indicators in both the connection dialog and the settings page. Additionally, add "Check for Updates" functionality for JRE runtime and JDBC drivers, fix driver download URL resolution, and fill missing database type mappings.
Changes
Rust Backend
src-tauri/src/download/mod.rs): Generic download abstraction with progress callbacks, timeout support, and Maven artifact resolutiondownload.rs,jre.rs,launcher.rsto use the centralized download module for all binary/artifact downloadscommands/jdbc.rswith progress-aware command handlers and registered the new modulecommands/jdbc.rs): Newcheck_driver_updatecommand withDriverUpdateStatus— checks Maven Central for latest version, supports both Maven artifacts and direct download URLs (HEAD + Content-Length comparison)download_jdbc_driver_directfix (download.rs): Replaced literal"latest"with dynamic Maven metadata resolution — fetches<latest>frommaven-metadata.xml. Addeddownload_urlpath for non-Maven drivers (e.g. GBase 8a). Priority:download_url>version_cap> metadatatdengine,yashandb,kingbasees,oceanbase_oracletoparse_db_typeinjdbc.rsandOceanbaseOracletodb_type_to_registry_keyinregistry.rsJava Bridge
BridgeMain,DriverResolver, andProtocolHandler— reports phase transitions, byte-level progress, and errors back to Rust via stdout protocolTypeScript/Frontend
useDownloadEvents.ts): Shared composable that listens to Tauri progress events and exposes reactive download state (progress, complete, error) — safe for concurrent component usageuseAppUpdater.ts,SettingsPage.vue): AddeddownloadProgresscomputed fromDownloadEvent, circular progress ring during update download, auto-download on checkhandleCheckJreUpdatesshows toast (up-to-date / update available) and auto-downloads with progresshandleCheckDriverUpdatesshows toast and auto-downloads. Bridge JAR gate on driver download with friendly toastnotificationsblock (upToDate, updateAvailable, downloadSuccess, installBridgeFirst, etc.) andactions.checkUpdatesto jreCard/bridgeCard/driversCard for both enUS and zhCNBuild
package-lock.jsonDriver Audit
drivers.toml↔registry.rs↔jdbc.rs↔state.rs— no gaps remaindownload_urlverified reachable (HTTP 200, 603KB)Architecture
Rust download module (progress callbacks) -> Tauri events (download-progress) -> useDownloadEvents composable (reactive state) -> Connection dialog / Settings page (UI progress bars)
Java bridge emits progress events via stdout protocol: BridgeMain/DriverResolver/ProtocolHandler -> stdout JSON progress messages -> Rust JDBC bridge parses -> Tauri events
Driver check-update: Frontend button click ->
check_driver_updateTauri command -> HTTP HEAD/Maven metadata query ->DriverUpdateStatusresponse -> toast + auto-download with progress